<?php if (!defined('THINK_PATH')) exit();?><html>
<head>
    <meta charset="utf-8">
    <link href="/Public/css/Admin/Bootstrap/bootstrap.css" rel="stylesheet" />
    <link href="/Public/css/Admin/my.css" rel="stylesheet" />
    <link href="/Public/css/Admin/Validform/Validform.css" rel="stylesheet" />
    <link href="/Public/css/Home/your.css" rel="stylesheet" type="text/css">

    <script language="JavaScript" src="/Public/js/Admin/jquery.1.11.3.min.js"></script>
    <script language="JavaScript" src="/Public/js/Admin/my.js"></script>
    <script language="JavaScript" src="/Public/js/Admin/Bootstrap/bootstrap.min.js"></script>
    <script language="JavaScript" src="/Public/js/Admin/Bootstrap/bootstrap-treeview.js"></script>
    <script language="JavaScript" src="/Public/js/Admin/Validform/Validform_v5.3.2_min.js"></script>
    <script language="JavaScript" src="/Public/js/Home/your.js"></script>

    <script type="text/javascript">
        $(function(){
             $(".registerform").Validform();
        })
    </script>
</head>
<body>
<nav class="navbar navbar-inverse">
    <div class="container" style="width: 100%;padding:0;">
        <div class="navbar-collapse collapse" style="width: 100%;padding:0;">
            <ul class="nav navbar-nav" style="width: 100%">
                <li <?php if(session('column_select') == ''): ?>class="active "<?php endif; ?>><a  style="padding-left:30px;padding-right:30px" href="<?php echo U('modules/columnSelect');?>">首页</a></li>
                <?php if(session('admin_modules') != ''): $_result=session('admin_modules')['modules'];if(is_array($_result)): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><li
                            <?php if(session('column_select') != ''): if($val['id'] == session('column_select') ): ?>class="active"<?php endif; endif; ?>
                        >
                        <a style="padding-left:30px;padding-right:30px" href="<?php echo U('modules/columnSelect?id='.$val['id']);?>"  ><?php echo ($val["name"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; endif; ?>
                <li class="active" style="float:right"><a style="background-color:rgba(92, 173, 136, 0.92)" href="<?php echo U('index/quit');?>">退 出</a></li>
            </ul>
        </div>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        <div class="col-md-2">
            <ul id="main-nav" class="nav nav-tabs nav-stacked" style="">
                <li class="active">
                    <a style="cursor:pointer"><i class="glyphicon glyphicon-th-large"></i>&nbsp;列表</a>
                </li>
                <?php if(session('modules_select') != ''): $_result=session('modules_select');if(is_array($_result)): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><li>
                            <a href="#systemSetting<?php echo ($val["id"]); ?>" class="nav-header collapsed" data-toggle="collapse">
                                <i class="glyphicon glyphicon-cog"></i>&nbsp;<?php echo ($val["name"]); ?><span class="pull-right glyphicon glyphicon-chevron-down"></span>
                            </a>
                            <ul id="systemSetting<?php echo ($val["id"]); ?>" class="nav nav-list secondmenu collapse "  >
                                <?php if(is_array($val["list"])): $i = 0; $__LIST__ = $val["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val2): $mod = ($i % 2 );++$i;?><li><a id="color-eee<?php echo ($val["id"]); ?>-<?php echo ($val2["id"]); ?>" href="<?php echo U('Modules/select?id='.$val2['id']);?>"><i class="glyphicon  glyphicon glyphicon-chevron-right"></i>&nbsp;&nbsp;<?php echo ($val2["name"]); ?></a></li>
                                    <?php if($val2['url'] != ''): if($val2['id'] == session('select') ): ?><script>
                                                $(document).ready(function(){
                                                    $("#systemSetting<?php echo ($val["id"]); ?>").addClass("in");
                                                    $("#color-eee<?php echo ($val["id"]); ?>-<?php echo ($val2["id"]); ?>").addClass("color-eee");
                                                });
                                            </script><?php endif; endif; endforeach; endif; else: echo "" ;endif; ?>
                            </ul>
                        </li><?php endforeach; endif; else: echo "" ;endif; endif; ?>
            </ul>
        </div>
        <div class="col-md-10" style="padding-left:0px;">
            <div class="panel panel-primary margin10" style="float:left;width:100%;min-height:650px;border-color:#3C4049;">
                <div class="panel-heading" style="background-color: #3C4049;">&nbsp;</div>
                <div class="panel-body">



<div style="float:left;width:100%">
    <form action="<?php echo U('Modules/editor');?>" method="post" id="form1" class="registerform"  >
        <div class="form-group width50">
            <label for="exampleInputEmail1">模块名称：</label>
            <input type="text" class="form-control"  placeholder="模块名称"  value="<?php echo ($list["name"]); ?>" name="name" datatype="*"  nullmsg="模块名称不可为空！" errormsg="请输入0~8个汉字">
        </div>
        <div class="form-group width50">
            <label for="exampleInputEmail1">Url：</label>
            <input type="text" class="form-control"  placeholder="Url" name="url" datatype="*"  nullmsg="Url不可为空！" errormsg="请输正确URL" value="<?php echo ($list["url"]); ?>">
        </div>
        <div class="form-group width50">
            <label for="exampleInputEmail1">归属分类：</label>
            <select class="form-control width50 " name="classify" id="class_relation">
                <?php if($classify != ''): if(is_array($classify)): $i = 0; $__LIST__ = $classify;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><option <?php if($val['id'] == $list['classify_id']): ?>selected<?php endif; ?> value="<?php echo ($val["id"]); ?>"><?php echo ($val["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; endif; ?>
            </select>
        </div>
        <input type="hidden" name="id"  value="<?php echo ($list["id"]); ?>">
        <button type="submit" class="btn btn-primary">保存</button>
    </form>
</div>

</div>
</div>
</div>
</body>
</html>